Shopping Cart Code 购物车编号
While shopping, he finds an item he wants, snaps a picture of the bar code with his cell phone, and places the item in his cart.
在购物时,他发现了需要的商品,使用移动电话拍摄了条形码图形,并将商品放在购物车中。
The method also returns the Cart, so that the client code can update the Cart contents and receive its new state in a single operation.
方法还返回Cart,这样客户代码在一个操作中就能更新Cart的内容并接收购物车的新状态。
Instead of having the client code make two calls on Cart, one to obtain the contents and one for the total price, I want to send all of this data to the client at once.
为了不让客户代码对Cart做两个调用(一个获得内容,一个获得总价),我想把这些数据一次全都发给客户。
应用推荐